/**
 * @Author: xukl
 * @Date: 2019/9/24
 * @description 人员下拉框接口
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';
import { getCompanyId } from '@/assets/js/auth';
// 人员获取
export const searchRoleByCode = params => {
  params.companyId = getCompanyId();
  return axios.get(`${SERVER.SYSMANAGE}/basedata/users/getUserListByRole`, { params });
};

export const searchRoleByCodes = params => {
  params.companyId = getCompanyId();
  return axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/roles/getUserInfoByRolePosition`, {
    params
  });
};
// 按职位查询人员 不传经销商id则不区分经销商
export const searchAllUserByRole = params => {
  return axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/findUserByRole`, {
    params
  });
};
  